package arrayList_basics.src.Extends;

public class HaShiQi extends Dog {
    String name = "哈士奇";
//    @Override
//    public void eat(){
//        String name = "吃狗粮";
//        System.out.println("吃狗粮");
////        System.out.println(name);
////        System.out.println(this.name);
////        System.out.println(super.name);
//    }

    @Override
    public void eat() {
        super.eat();
        System.out.println("吃狗粮");
    }

    public void chaiJia(){
        String name = "拆家";
        System.out.println("拆家");
    }
    public HaShiQi(){
        super(); // 调用父类的无参构造
    }
    public HaShiQi(String name){
//        super(); // 调用父类的无参构造
        super(name); // 调用父类的无参构造
    }
}
